{extend name="layouts/iframe" /}

{block name="pagecss"}

{/block}

{block name="content"}
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" action="">
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="required">*</span>名称</label>
                    <div class="layui-input-inline" style="width: 40%;">
                        <input type="text" class="layui-input" name="name" value="{{$info.name}}" maxlength="40" lay-verify="required" placeholder="10个字以内" autocomplete="off">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="required">*</span>上级菜单</label>
                    <div class="layui-input-inline">
                        <select class="parent_id" name="parent_id" lay-verify="required">
                            {foreach $menuOptions as $menukey => $menu}
                                <option value="{{$menukey}}" {if ($info.parent_id == $menukey) } selected {/if}>{{$menu|raw}}</option>
                            {/foreach}
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="required">*</span>模块</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="app" value="{{$info.app}}" maxlength="30" lay-verify="required" placeholder="eg: admin" autocomplete="off">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="required">*</span>控制器</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="controller" value="{{$info.controller}}" maxlength="30" lay-verify="required" placeholder="eg: Index" autocomplete="off">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="required">*</span>方法</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" name="action" value="{{$info.action}}" maxlength="30" lay-verify="required" placeholder="eg: index" autocomplete="off">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">图标</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input icon_name" name="icon" value="{{$info.icon}}" maxlength="30" placeholder="" autocomplete="off">
                    </div>
                    <span class="layui-btn layui-btn-primary icon_design" style="padding:0 12px;min-width:45px"><i style="font-size:1.2em;margin:0" class="layui-icon {{$info.icon}}"></i></span>
                    <button type="button" class="layui-btn layui-btn-primary select-icon">选择</button>
                    <!--<button type="button" class="layui-btn layui-btn-danger del-icon" style="width: 45px;padding: 0;"><i class="layui-icon layui-icon-delete"></i></button>-->
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">排序</label>
                    <div class="layui-input-inline">
                        <input type="number" class="layui-input" name="sorting" value="{{$info.sorting}}" maxlength="10" placeholder="1000" autocomplete="off">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="required">*</span>状态</label>
                    <div class="layui-input-inline">
                        <input type="radio" name="status" value="1" title="显示" {if ($info.status == 1) }checked=""{/if} >
                        <input type="radio" name="status" value="2" title="隐藏" {if ($info.status == 2) }checked=""{/if} >
                    </div>
                </div>

                <input type="hidden" name="id" value="{{$info.id}}">

                <div class="layui-form-item layui-layout-admin">
                    <div class="layui-input-block">
                        <div class="layui-footer" style="left: 0;">
                            <button type="button" class="layui-btn layui-btn-primary close-btn">取消</button>
                            <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="laySave">保存 <i class="layui-icon layui-icon-release"></i></button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<input type="hidden" class="save_url" value="{{:url('/'.strtolower($model).'/editpost')}}">
<input type="hidden" class="icons_url" value="{{:url('/iframe/icons')}}">
{/block}

{block name="pagescript"}
<script src="{{:asset('__STATIC__/admin/pages/js/adminmenu.js')}}" type="text/javascript"></script>
{/block}